<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>[title]</title>
    <link rel="stylesheet" href="/public/static/css/bootstrap.min.css">
    <link rel="stylesheet" href="/public/static/css/style.css">
    <link rel="stylesheet" href="/public/static/css/icon.css">
    <link rel="stylesheet" href="/public/static/css/layer.css">
</head>
<body>
    <div class="i-nav">
        <div class="left">
            <div id="sidebar" class="item" onclick="openNav()">
                <div class="icon">
                <i class="iconfont icon-menu-fill"></i>
                </div>
            </div>
            <div class="item">
                <a href="/admin">
                    <span class="title">Admin Index</span>
                </a>
            </div>
            <div class="item">
                <a href="/">
                    <span class="title">Home</span>
                </a>
            </div>
        </div>
        <div class="right">
            <div class="item islogin" style="display: none;">
                <div class="img">
                    <img src="" alt="avatar"/>
                </div>
                <span id="username"></span>
                <div class="more">
                    <div class="item">身份：<span>普通用户</span></div>
                    <div class="item" id="userhome"><a href="#">我的个人主页</a></div>
                    <div class="item" id="edit" data-toggle="modal" data-target="#userModal"><a href="#">编辑我的资料</a></div>
                    <div class="item" id="logout"><a href="#">退出登录</a></div>
                </div>
            </div>
        </div>
    </div>
    <div id="mySidenav" class="i-sidebar">
        <div class="item title">
            <a href="/admin/index">
                <div class="icon">
                    <i class="iconfont icon-dashboard"></i>
                </div>
                <span>仪表盘</span>
            </a>
        </div>
        <div class="item title">
            <a href="/admin/addChallenge">
                <div class="icon">
                    <i class="iconfont icon-list-style"></i>
                </div>
                <span>新增挑战</span>
            </a>
        </div>
        <div class="item title">
            <a href="/admin/challengeList">
                <div class="icon">
                    <i class="iconfont icon-list-style"></i>
                </div>
                <span>挑战列表</span>
            </a>
        </div>
        <div class="item title">
            <a href="/admin/userList">
                <div class="icon">
                    <i class="iconfont icon-list-style"></i>
                </div>
                <span>用户管理</span>
            </a>
        </div>
        <div class="item title">
            <a href="/admin/sortList">
                <div class="icon">
                    <i class="iconfont icon-list-style"></i>
                </div>
                <span>分类管理</span>
            </a>
        </div>
        <div class="item title">
            <a href="/admin/notifyList">
                <div class="icon">
                    <i class="iconfont icon-list-style"></i>
                </div>
                <span>公告管理</span>
            </a>
        </div>
        <div class="item title">
            <a href="/admin/Submit">
                <div class="icon">
                    <i class="iconfont icon-list-style"></i>
                </div>
                <span>提交记录</span>
            </a>
        </div>
        <div class="item title">
            <a href="/admin/Setting">
                <div class="icon">
                    <i class="iconfont icon-list-style"></i>
                </div>
                <span>站点设置</span>
            </a>
        </div>
    </div>
<style>
.main{margin-bottom:0;padding:55px 10px 10px 215px;}
.i-sidebar{position:fixed;top:50px;left:0;z-index:1;overflow-x:hidden;overflow-y:auto;padding:0;width:196px;height:calc(100% - 40px);background:#fff;box-shadow:0 0 5px rgb(0 0 0 / 10%);transition:all .2s;}
.i-sidebar>.item{position:relative;display:block;overflow:hidden;height:48px;white-space:nowrap;transition:background .2s;}
.i-sidebar>.item.title a{display:block;margin:0;padding:15px 20px;color:#212529;font-size:20px;line-height:20px;}
.i-sidebar>.item.title .icon .iconfont{margin-right:10px;width:24px;height:24px;min-width:24px;color:rgba(0,0,0,.54);font-size:20px;}
.i-sidebar::-webkit-scrollbar{width:5px;}
.i-sidebar::-webkit-scrollbar-thumb{border-radius:10px;background:rgba(0,0,0,.1);}
tbody td .badge{cursor:pointer;transition:all .3s;}
tbody td .badge:hover{opacity:.7;transition:all .3s;}
.page-title .add{position:absolute;right:10px;display:inline-block;cursor:pointer;transition:all .3s;}
.page-title .add span:hover{color:#1890ff;transition:all .3s;}
@media (max-width:1024px){#sidebar{display:inline;}
.i-sidebar{overflow-y:hidden;width:0;box-shadow:none;}
.main{box-sizing:border-box;padding:45px 10px 10px 10px;height:100%;}}
@media (min-width:280px) and (max-width:767px){.i-sidebar{overflow-y:hidden;width:0;box-shadow:none;}
.main{box-sizing:border-box;padding:45px 10px 10px 10px;height:100%;}}
@media (max-width:540px){.i-sidebar{overflow-y:hidden;width:0;box-shadow:none;}
.main{box-sizing:border-box;padding:45px 10px 10px 10px;height:100%;}}
@media (max-width:500px){.i-sidebar{overflow-y:hidden;width:0;box-shadow:none;}
.main{box-sizing:border-box;padding:45px 10px 10px 10px;height:100%;}}
@media (max-width:320px){.right{display:none;}
.form-group>input{width:85%;}}
@media (min-width:360px) and (max-width:415px){.form-group>input{width:89%;}}
</style>
<div class="main">
    <div class="modal fade" id="userModal" tabindex="-1" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title"></h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="form" id="editUser">
                    <div class="avatar">
                        <img src="" alt="avatar"/>
                        <i class="iconfont icon-page">
                            <input type="file" name="file" id="uploadImage" onchange="postData()" accept="image/*">
                        </i>
                    </div>
                    <div class="name"></div>
                    <span name="id" style="display:none;"></span>
                    <div class="form-group">
                        <input name="username" type="text" placeholder="请输入新用户名">
                        <i class="iconfont icon-user"></i>
                    </div>
                    <div class="form-group">
                        <input name="email" type="text" placeholder="请输入新邮箱">
                        <i class="iconfont icon-post"></i>
                    </div>
                    <div class="form-group">
                        <input name="password" type="password" placeholder="请输入新密码">
                        <i class="iconfont icon-lock"></i>
                        <p class="tips" id="mail—tips">您输入的邮箱地址不正确</p>
                    </div>
                    <div class="form-group">
                        <input name="website" type="text" placeholder="请输入网站地址">
                        <i class="iconfont icon-url"></i>
                        <p class="tips" id="url-tips">您输入的网站地址不正确</p>
                    </div>
                    <div class="form-group">
                        <input name="content" type="text" placeholder="请输入个性签名">
                        <i class="iconfont icon-post"></i>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
                    <button type="button" id="update" class="btn btn-primary">确认</button>
                </div>
            </div>
        </div>
    </div>
    <div class="loading">
        <div class="spinner-border float-right" role="status">
            <span class="sr-only">Loading...</span>
        </div>
    </div>